<template>
  <div>
    <h3>App组件</h3>
    <!-- <p @click="aaa">调用子组件的方法</p> -->
    <button @click="aaa">调用子组件的方法</button>
    <my-test ref="test"></my-test>
    <my-abc></my-abc>
  </div>
</template>

<script>
import MyAbc from './components/MyAbc.vue'
import MyTest from './components/MyTest.vue'
export default {
  components: { MyTest, MyAbc },
  methods : {
    aaa() {
      this.$refs.test.getP()
    }
  }
}
</script>

<style>

</style>